<?php 
	include('fnc.php'); 
?>
<h3>Send Message</h3>
<form id="msg-form" class="" style="text-align: left;">
	<?php 
		//If custom, users can send to multiple users
		if($_GET['to'] == 'custom'){
	?>
		<div class="lFormItem">
			<input id="msg-to" name="msg-to" class="regInputItem ghost_text lFormInput" placeholder="Type your friend's Username or email" type="text" tabindex=1 />
			<ul id="">
				
			</ul>
		</div>
	<?php } else { ?>
		<div class="lFormItem">
			<p>To</p>
			<a href="<?php echo DOMAIN . "/" . getName($_GET['to']); ?>">
				<img src="<?php echo userimage($_GET['to'], 'small'); ?>" width="40" class="left" style="width: 40px; margin: 10px 5px; float: left;"/>
				<div class="left" style="margin-top: 10px;">
					<h5><?php echo getName($_GET['to']); ?></h5>
				</div>
			</a>
		</div>
	<?php } ?>

	<div class="lFormItem">
		<textarea id="msg-content" name="msg-to" class="regInputItem ghost_text lFormInput" placeholder="Message" type="text" tabindex=1 ></textarea>
		<div class="errorMsg hide clear rError" style="padding: 5px; color: #333; font-size: 11px;" >
			<span class="errorMsg hide rError">Message cannot be more than 500 characters.</span>
		</div>
	</div>
	<div>
		<img class="loader hide" src="img/ajaxLoader.gif" style="position: relative; left: 340px; top: 20px;"/>
		<button id="msg-send" type="button" class="btnB right" data-to="<?php echo $_GET['to']; ?>" style="margin-right: -13px; margin-top: 10px;">Send</button>
	</div>
	<div class="clear"></div>       
</form>
<div class="clear"></div>